﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QCYHApp
{
    class Model
    {
        #region 列表查询接口
        /// <summary>
        /// 列表查询接口
        /// </summary>
        public class queryInvoiceList
        {
            private static string _code = string.Empty;
            private static string _msg = string.Empty;
            private static List<Items> _items = null;
            public string code { get { return _code; } set { _code = value; } }
            public string describe { get { return _msg; } set { _msg = value; } }
            public List<Items> items { get { return _items; } set { _items = value; } }
            public class Items
            {
                private static string _business_name = string.Empty;
                private static string _code = string.Empty;
                private static string _exchange_status = string.Empty;
                private static string _exchange_status_text = string.Empty;
                private static Exchange_code _exchange_code = null;
                public string business_name { get { return _business_name; } set { _business_name = value; } }
                public string code { get { return _code; } set { _code = value; } }
                public string exchange_status { get { return _exchange_status; } set { _exchange_status = value; } }
                public string exchange_status_text { get { return _exchange_status_text; } set { _exchange_status_text = value; } }
                public Exchange_code exchange_code { get { return _exchange_code; } set { _exchange_code = value; } }  //List

                public class Exchange_code
                {
                    private static string _company_name = string.Empty;
                    private static string _credit_code = string.Empty;
                    private static string _company_type = string.Empty;
                    private static string _reg_capital = string.Empty;
                    private static string _found_date = string.Empty;
                    private static string _expire_date = string.Empty;
                    private static string _legal_person = string.Empty;
                    private static string _person = string.Empty;
                    private static string _quality = string.Empty;
                    private static string _warehouse = string.Empty;
                    private static string _issue_date = string.Empty;
                    private static string _issue_unit = string.Empty;
                    private static string _mode = string.Empty;
                    private static string _id_number = string.Empty;
                    private static string _scope = string.Empty;
                    private static string _address = string.Empty;
                    private static string _exchange_attachment_expire_dateo = string.Empty;
                    private static string _qualification_type_name = string.Empty;
                    private static string _exchange_attachment_sign_file = string.Empty;
                    public string company_name { get { return _company_name; } set { _company_name = value; } }
                    public string credit_code { get { return _credit_code; } set { _credit_code = value; } }
                    public string company_type { get { return _company_type; } set { _company_type = value; } }
                    public string reg_capital { get { return _reg_capital; } set { _reg_capital = value; } }
                    public string found_date { get { return _found_date; } set { _found_date = value; } }
                    public string expire_date { get { return _expire_date; } set { _expire_date = value; } }
                    public string legal_person { get { return _legal_person; } set { _legal_person = value; } }
                    public string person { get { return _person; } set { _person = value; } }
                    public string quality { get { return _quality; } set { _quality = value; } }
                    public string warehouse { get { return _warehouse; } set { _warehouse = value; } }
                    public string issue_date { get { return _issue_date; } set { _issue_date = value; } }
                    public string issue_unit { get { return _issue_unit; } set { _issue_unit = value; } }
                    public string mode { get { return _mode; } set { _mode = value; } }
                    public string id_number { get { return _id_number; } set { _id_number = value; } }
                    public string scope { get { return _scope; } set { _scope = value; } }
                    public string address { get { return _address; } set { _address = value; } }
                    public string exchange_attachment_expire_date { get { return _exchange_attachment_expire_dateo; } set { _exchange_attachment_expire_dateo = value; } }
                    public string qualification_type_name { get { return _qualification_type_name; } set { _qualification_type_name = value; } }
                    public string exchange_attachment_sign_file { get { return _exchange_attachment_sign_file; } set { _exchange_attachment_sign_file = value; } }
                }
            }
        }
        #endregion

        #region 字典
        public string Field(string param)
        {
            string result = "";
            Dictionary<string, string> dict = new Dictionary<string, string>();
            dict.Add("imageid","图片ID");
            dict.Add("detailid", "资料ID");
            dict.Add("batchid", "批号");
            dict.Add("drugbatchid", "资料|批号");
            dict.Add("qualification_type_id", "类别ID");
            result = dict.ContainsKey(param.ToLower()) ? dict[param.ToLower()] : param.ToLower();
            return result;
        }
        #endregion
    }
}

